//
//  ViewController.m
//  UI_homework_07_UITabBarController
//
//  Created by li cheng on 16/7/22.
//  Copyright © 2016年 li cheng. All rights reserved.
//

#import "ViewController.h"
#import "LabelAndTextFiled.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    LabelAndTextFiled *loading = [[LabelAndTextFiled alloc] initWith:CGRectMake(100, 100, 400, 60) labelScale:1 textFiled:4 labeName:@"用户名" textFieldPlaceholder:@"请输入用户名"];
    [self.view addSubview:loading];
    LabelAndTextFiled *password = [[LabelAndTextFiled alloc] initWith:CGRectMake(100, 160, 400, 60) labelScale:1 textFiled:4 labeName:@"密码" textFieldPlaceholder:@"请输入密码"];
    [self.view addSubview:password];
    UIButton *forgetPassword = [UIButton buttonWithType:UIButtonTypeSystem];
    forgetPassword.frame = CGRectMake(100, 200, 200, 60);
    [forgetPassword setTitle:@"忘记密码?" forState:UIControlStateNormal];
    [self.view addSubview:forgetPassword];
    // 登录按钮
    UIButton *loadingButton = [UIButton buttonWithType:UIButtonTypeSystem];
    [loadingButton setTitle:@"登录" forState:UIControlStateNormal];
    loadingButton.frame = CGRectMake(100, 300, 200, 60);
    loadingButton.backgroundColor = [UIColor greenColor];
    [self.view addSubview:loadingButton];
    // 注册按钮
    UIButton *login = [UIButton buttonWithType:UIButtonTypeSystem];
    [login setTitle:@"注册" forState:UIControlStateNormal];
    login.frame = CGRectMake(100, 400, 200, 60);
    login.backgroundColor = [UIColor greenColor];
    [self.view addSubview:login];
    // 返回按钮
    UIButton *back = [UIButton buttonWithType:UIButtonTypeSystem];
    [back setTitle:@"返回" forState:UIControlStateNormal];
    back.frame = CGRectMake(100, 500, 200, 60);
    back.backgroundColor = [UIColor greenColor];
    [back addTarget:self action:@selector(back:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:back];
}

- (void)back:(UIButton *)button{
    [self dismissViewControllerAnimated:YES completion:^{
        
    }];
}





- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
